export default {
  chart: {
    type: 'gauge',
    reflow: true,
    spacingTop: 0,
    spacingRight: 0,
    spacingBottom: 0,
    spacingLeft: 0
  },
  pane: {
    center: ['50%', '70%'],
    size: '100%',
    startAngle: -80,
    endAngle: 80,
    background: null
  },
  tooltip: {
    formatter: function () {
      const { point } = this
      const { y = 0, max = 0 } = point
      return '最大抄表数:' + max + '条<br/>实际抄表数:' + y + '条'
    },
    followPointer: true
  },
  plotOptions: {
    gauge: {
      dataLabels: {
        y: 5,
        borderWidth: 0,
        useHTML: true
      },
      dial: {
        radius: '100%',
        backgroundColor: '#25f3e6',
        borderColor: '#25f3e6',
        baseWidth: 4,
        borderWidth: 1
      },
      pivot: {
        backgroundColor: '#0035f9',
        radius: 8,
        borderWidth: 1,
        borderColor: '#0035f9'
      }
    }
  },
  credits: {
    enabled: false
  },
  yAxis: {
    softMin: 0,
    softMax: 200,
    minorTickPosition: 'outside',
    tickPosition: 'outside',
    minorTickWidth: 1,
    minorTickColor: '#25f3e6',
    tickColor: '#d12159',
    tickWidth: 2,
    labels: {
      enabled: true,
      rotation: 'auto',
      distance: 20,
      style: {
        color: '#ffffff'
      }
    },
    plotBands: {
      from: 190,
      to: 200,
      color: '#ff0000',
      innerRadius: '100%',
      outerRadius: '110%'
    }
  },
  series: [{
    name: '',
    data: [0],
    innerRadius: '70%',
    outerRadius: '100%',
    dataLabels: {
      format: '<div style="text-align:center"><span style="font-size:18px;color:#ffffff">{y}</span><br/>' +
        '<span style="font-size:12px;color:silver">条</span></div>'
    },
    tooltip: {
      valueSuffix: '条'
    }
  }]
}
